#include "StdAfx.h"
#include "my_session_mgr.h"
#include <boost/shared_ptr.hpp>
#include <boost/bind.hpp>
#include "my_session_event_handler.h"

using namespace utility::network;

void CSessionMgr::on_accept(session * pSession)
{
    CSessionEventHandler::pointer pEventHandler = CSessionEventHandler::pointer(
        m_HandlerPool.construct());
    pSession->set_event_handler(pEventHandler);
    pEventHandler->SetSession(pSession);

}

void CSessionMgr::ReleaseEventHandler(CSessionEventHandler * pEventHandler)
{
    m_HandlerPool.destroy(pEventHandler);
}
